package org.moflon.moca;

import org.moflon.util.eMoflonEMFUtil;

import Moca.CodeAdapter;
import Moca.MocaFactory;
import MocaTree.Folder;
import URILanguage.URIContainer;
import URILanguage.URILanguagePackage;

public class TestSDM {
	
	public static void main(String[] args) {
		eMoflonEMFUtil.init(URILanguagePackage.eINSTANCE);
		URIContainer container = (URIContainer) eMoflonEMFUtil.loadModel("instances/uricontainer.xmi");
		
		container.addMailToAdmin();
		
		eMoflonEMFUtil.saveModel(container, "instances/uricontainerWithAdmin.xmi");
		
		Folder tree = (MocaTree.Folder) container.createTreeForCodeGen();
		
		CodeAdapter codeAdapter = MocaFactory.eINSTANCE.createCodeAdapter();
		
		codeAdapter.unparse("instances/", tree);
	}
}